import {request} from '../utils/request'
module.exports = {
  /**
   * 发布回收订单
   */
  publishOrder(form) {
    return request('/order', 'post', form)
  },

  /**
   * 回收订单列表
   */
  listOrder(param) {
    return request('/order', 'get', param)
  },

  /**
   * 回收订单详情
   */
  orderDetail(orderId) {
    return request('/order/detail/' + orderId, 'get', '')
  },

  /**
   * 回收员接取订单
   */
  acceptOrder(param) {
    return request('/order/accept/' + param, 'put', '');
  },

  /**
   * 回收员取消接单
   */
  cancelAcceptOrder_(param) {
    return request('/order/cancel-accept/' + param, 'put', '');
  },

  /**
   * 回收员完成回收
   */
  collectOrder_(data) {
    return request('/order/collect/', 'post', data);
  },

  /**
   * 发布者取消订单
   */
  cancelOrder_(param) {
    return request('/order/cancel/' + param, 'put', '');
  },

   /**
   * 发布者确认订单
   */
  confirmOrder_(param) {
    return request('/order/confirm/' + param, 'put', '');
  },

  /**
   * 发布者要求重新回收
   */
  cancelConfirmOrder_(param) {
    return request('/order/cancel-confirm/' + param, 'put', '');
  },
}